package com.clhbolg.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.clhbolg.model.dto.TalkDTO;
import com.clhbolg.service.ITalkService;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author cailinhu
 * @Description TODO
 * @Date 2023/3/13 10:04
 * @Version 1.0
 */
@RestController
public class TalksController {

    @Autowired
    ITalkService talkService;


    /**
     * 查询说说列表
     *
     * @param pageQuery
     * @return
     */
    @GetMapping("/talks")
    @SaIgnore
    public R listTalks(PageQuery pageQuery){
       TableDataInfo<TalkDTO> list= talkService.listTalks(pageQuery);
        return R.ok(list);
    }


}
